package chp09;

import java.util.Scanner;

public class Test3 {

    static Scanner input = new Scanner(System.in);

    // 登录菜单
    public static void loginMenu(){
        System.out.println("欢迎使用学生管理系统");
        System.out.println("1.进入系统");
        System.out.println("2.退出");
        System.out.print("请选择:");
        int choose = input.nextInt();
        if(choose == 1){
            mainMenu();
        }else{
            System.out.println("再见");
        }
    }


    // 添加学生
    public static void addStudent() {
        System.out.println("请输入学生姓名:");
        String name = input.next();
    }

    // 修改学生
    public static void updateStudent() {
        System.out.println("请输入学生姓名:");
        String name = input.next();
    }

    // 查询学生
    public static void queryStudent() {
        System.out.println("请输入学生姓名:");
        String name = input.next();
    }

    // 删除学生
    public static void deleteStudent() {
        System.out.println("请输入学生姓名:");
        String name = input.next();
    }

    // 主菜单
    public static void mainMenu(){
        System.out.println("\n成功进入系统");
        System.out.println("1.新增学生");
        System.out.println("2.修改学生");
        System.out.println("3.查询学生");
        System.out.println("4.删除学生");
        System.out.print("请选择:");
        int choose = input.nextInt();
        if(choose == 1){
            addStudent();
        }else if(choose == 2){
            updateStudent();
        }else if(choose == 3){
            queryStudent();
        }else if(choose == 4){
            deleteStudent();
        }else{
            System.out.println("输入有误");
        }
    }

    public static void main(String[] args) {
        loginMenu();
    }
}